package com.es.www.patternforinterface;

/**
 * @Created by michangtao
 * @Date 2022/5/17 13:50
 * @Description
 */
public class Client {

    public static void main(String[] args) {

        /**
         * 匿名内部类方式
         */
        AbstractAdapterMonk adapterMonk = new AbstractAdapterMonk() {
            @Override
            public void upholdJustice() {
                System.out.println("拳打镇关西");
            }
        };

        adapterMonk.upholdJustice();

        /**
         * 具体实现类方式
         */
//        LuZhiShen luZhiShen = new LuZhiShen();
//        luZhiShen.upholdJustice();
    }
}
